package com.zhang.factory.example;

/**
 * @author ElloeStudy(Sifa Zhang)
 * @create 2022-02-28 20:36
 * To: 真常应物，真常得性，常清常静，常清静矣
 */
public class NvWa {
    public static void main(String[] args) {
        System.out.println("----------------------");
        Human whiteHuman = HumanFactory.createHuman(WhiteHuman.class);
        whiteHuman.cry();
        whiteHuman.talk();
        whiteHuman.laugh();

        System.out.println("========================");
        Human blackHuman = HumanFactory.createHuman(BlackHuman.class);
        blackHuman.cry();
        blackHuman.talk();
        blackHuman.laugh();

        System.out.println("=========================");
        Human yellowHuman = HumanFactory.createHuman(YellowHuman.class);
        yellowHuman.talk();
        yellowHuman.cry();
        yellowHuman.laugh();
    }
}
